import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

const pathResolve = (dir: string): any => {
    return resolve(__dirname, '.', dir)
}

// https://vitejs.dev/config/
const viteConfig = () => {
    const alias: Record<string, string> = {
        '/@': pathResolve('./src/'),
        assets: pathResolve('./src/assets'),
    }
    return {
        resolve: {
            alias,
        },
        plugins: [vue()],
    }
}

export default viteConfig
